<template>
	<view class="item-info unify-flex" @tap="">
		<image class="cover unify-radius" :src="orderDetails.image ||errorImage" mode=""></image>
		
		<view class="item-right unify-relative">
			<view class="item-name unify-weight unify-font-size-line-astrict">{{orderDetails.name}}</view>
		
			<!-- <view class="item-spec">已选：微辣</view> -->
			
			<view class="item-bottom unify-weight unify-absolute unify-flex">
				<view :class="'tf-' + themeColor.name">
					<text class="money-symbol">{{moneySymbol}}</text>
					{{orderDetails.amount}}
				</view>
				
				<view class="item-num">X{{orderDetails.number}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			orderDetails:{
				type:Object,
				default:null
			}
			
			
		},
		data() {
			return {
				errorImage: this.$mAssetsPath.errorImage,
				moneySymbol: this.$mConstDataConfig.moneySymbol,
			}
		},
		methods: {
			// 切换
			tapSkip(orderDetails) {
				this.$openPage({
					name:'userOrderDetails',
					query: {
						data: orderDetails
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	$image: 200rpx;
	
	.item-info {
		align-items: center;
		justify-content: space-between;
		
		.cover {
			width: $image;
			height: $image;
		}
		
		.item-right {
			width: 66%;
			height: $image;
			
			.item-name {
				font-size: $uni-font-size-base;
				margin-top: 10rpx;
			}
			
			.item-spec {
				font-size: $uni-font-size-sm;
				color: $uni-text-color-grey;
				margin-top: 10rpx;
			}
			
			.item-bottom {
				width: 100%;
				bottom: 10rpx;
				font-size: $uni-font-size-big;
				align-items: center;
				justify-content: space-between;
				
				.money-symbol {
					font-size: $uni-font-size-base;
				}
				
				.item-num {
					font-size: $uni-font-size-base;
					font-weight: 500;
					color: $uni-text-color-grey;
				}
			}
		}
	}
</style>
